import * as React from 'react';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import AddData from './pages/addData';
import FaultList from './pages/faultList';

const App = (): JSX.Element => {
  return (
    <Router>
      <Switch>
        <Route exact path="/" component={FaultList} />
        <Route path="/add" component={AddData} />
        <Route path="/edit/:id" component={AddData} />
      </Switch>
    </Router>
  );
};

export default App;
